/*
 * @Author: xiaosihan 
 * @Date: 2023-08-21 22:46:28 
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2024-01-01 01:02:58
 */
import { Modal, Tooltip } from "antd";
import clsx from "clsx";
import { autorun } from "mobx";
import { useEffect, useRef, useState } from "react";
import emptySVG from "./empty.svg?raw";
import styles from "./toolEmpty.module.less";
import designEditor from "@/editorComponent/designEditor";

interface Iprops {
}


// 清空
export default function ToolEmpty() {

    const dom = useRef<HTMLDivElement | null>(null);
    const [data, setData] = useState({});
    const [disable, setDisable] = useState(true);

    useEffect(() => {

    }, []);

    useEffect(() => autorun(() => {

    }), []);

    return (
        <Tooltip
            title="清空(ctrl+\)"
            placement="bottom"
            mouseLeaveDelay={0}
            mouseEnterDelay={0.5}
        >
            <span
                className={clsx(styles.toolEmpty, disable && styles.disable)}
                dangerouslySetInnerHTML={{ __html: emptySVG }}
                onClick={() => {
                    designEditor.clear();
                }}
            >
            </span>
        </Tooltip>
    );

}